/*
 * Controller.m
 *
 * You may freely copy, distribute, and reuse the code in this example.
 * NeXT disclaims any warranty of any kind, expressed or  implied, as to its
 * fitness for any particular use.
 *
 * Written by Kenny Leung, NeXT Technical Support
 *
 */

#import "Controller.h"
#import <eointerface/EOController.h>

@implementation Controller

- discard:sender
{
    [controller endEditing];
    [controller discardEdits];
    [controller redisplay];
    [docWindow setDocEdited:NO];
    [discardButton setEnabled:NO];
    return self;
}

- (void)controller:(EOController *)aController associationDidBeginEditing:(EOAssociation *)association
{
    [docWindow setDocEdited:YES];
    [discardButton setEnabled:YES];
    
    return;
}

@end
